package com.leyou.common.pojo;

import java.util.List;

/**
 * 该类是个分页的工具类。放到common里，以后可以共用
 */
public class PageResult<T> {
    private Long total; // 总条数
    private Integer totalPage; // 总页数
    private List<T> items; // 当前页的数据

    // 全参构造
    public PageResult(Long total, Integer totalPage, List<T> items) {
        this.total = total;
        this.totalPage = totalPage;
        this.items = items;
    }

    // 2个参数构造
    public PageResult(Long total, List<T> items) {
        this.total = total;
        this.items = items;
    }
    // 无参构造
    public PageResult() {
    }



    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public Integer getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }


}
